<template>
    <a-card :title="dict?.paperType || '加载中'" style="width: 300px">
        <a-tag color="green">{{ dict?.paperLevel }}</a-tag> 预期工作量: {{ dict?.workloadMin }} ~ {{ dict?.workloadMax }}
    </a-card>
</template>
<script setup>
import useApp from '@/hooks';
const { $ } = useApp();
import { queryOne } from '@/custom/nepu/api/nepu_paper_dict';
const dict = ref(null)
const props = defineProps({
    dictId: {
        type: String
    }
})
// 查询词典
function dictQuery() {
    if (!$.isEmpty(props.dictId)) {
        queryOne(props.dictId).then(res => {
        console.log(res)
        dict.value = res;
    })
    }
   
}
// 监听 数据
watch(() => props.dictId, (newVal, oldVal) => {
    console.log(props.dictId)
    if (!$.isEmpty(props.dictId)) {
        dictQuery();
    }
})
//
dictQuery();
</script>